// Refs: https://codeboard.io/projects/11587?view=2.1-21.0-22.0

import java.io.File
import java.io.FileOutputStream
import java.io.IOException

class Resources {

  companion object {
    fun allocateResource(): FileOutputStream? {
      return try {
        val file = File("foo.txt")
        FileOutputStream(file)
      } catch (e: IOException) {
        null
      }
    }
  }
}